package saiboten;

import java.util.ArrayList;
import java.util.List;

public class QnetBot {
	public static void main(String[] args) {
		Saiboten qnetBot = new Saiboten();
		qnetBot.setVerbose(true);
		List<String> channels = new ArrayList<String>();
		channels.add("kodehjelp");
		channels.add("starcraft2.no");
		qnetBot.setChannelList(channels);
		
		while (!qnetBot.isConnected()) {
			try {
				qnetBot.connect("port80.se.quakenet.org");
			} catch (Exception e) {
				System.out.println("Couldn't connect. Sleeping.");
				try {
					Thread.sleep(60000);
				} catch (InterruptedException e1) {
					e1.printStackTrace();
				}
				System.out.println("Awake! Let's connect.");
			}
		}
	}
}
